<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>社交活动平台 - 参与记录</title>
    <style>
 /* 重置样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

 body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background-color: #f5f7fa;
            color: #333;
 line-height: 1.6;
 }

        /* 容器样式 */
 .container {
            max-width: 480px;
            margin: 0 auto;
 background-color: #fff;
            min-height: 100vh;
        }

        /* 头部导航 */
        .header {
 position: sticky;
            top: 0;
            background-color: white;
            padding: 16px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
 z-index: 100;
 }

        .header-content {
            display: flex;
 align-items: center;
 justify-content: space-between;
        }

 .back-btn {
            background: none;
            border: none;
 font-size: 24px;
 cursor: pointer;
 color: #333;
        }

        .header-title {
 font-size: 18px;
 font-weight: bold;
 flex-grow: 1;
            text-align: center;
        }

 .action-btn {
            background: none;
            border: none;
 font-size: 16px;
 color: #ff6b35;
            cursor: pointer;
 }

        /* 参与状态筛选 */
 .status-filter {
            display: flex;
 background-color: #f9f9f9;
            border-bottom: 1px solid #eee;
        }

 .filter-item {
            flex: 1;
            text-align: center;
            padding: 16px 0;
 font-size: 14px;
            color: #999;
            cursor: pointer;
 transition: all 0.3s ease;
        }

        .filter-item.active {
            color: #ff6b35;
 font-weight: bold;
 position: relative;
        }

 .filter-item.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background-color: #ff6b35;
        }

 /* 参与统计 */
        .stats-section {
            padding: 20px;
            background-color: #f9f9f9;
            text-align: center;
        }

 .stats-grid {
            display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 16px;
            margin-top: 16px;
 }

        .stat-card {
            background-color: white;
            border-radius: 12px;
 padding: 16px 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
 }

        .stat-number {
 font-size: 24px;
            font-weight: bold;
 color: #ff6b35;
 }

        .stat-label {
 font-size: 14px;
 color: #666;
        }

        /* 活动列表 */
        .activity-list {
            padding: 16px;
 }

        /* 活动卡片 */
        .activity-card {
 background: white;
            border-radius: 16px;
 overflow: hidden;
            margin-bottom: 20px;
 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
 transition: all 0.3s ease;
 cursor: pointer;
        }

        .activity-card:hover {
            transform: translateY(-2px);
 box-shadow: 0 6px 16px rgba(0, 0, 20, 0.1);
        }

 /* 卡片封面 */
        .activity-cover {
            width: 100%;
 height: 160px;
            object-fit: cover;
        }

        /* 卡片内容 */
        .activity-content {
            padding: 16px;
 }

        .activity-title {
            font-size: 18px;
 font-weight: bold;
 margin-bottom: 8px;
 color: #333;
        }

        .activity-meta {
 display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
            font-size: 14px;
 color: #666;
        }

 .meta-item {
            display: flex;
 align-items: center;
 }

        .meta-icon {
 margin-right: 4px;
            font-size: 16px;
        }

        /* 活动标签 */
        .activity-tags {
            display: flex;
 gap: 8px;
            margin-bottom: 12px;
        }

 .tag {
            background-color: #f0f8ff;
 color: #45b7d1;
 padding: 4px 12px;
            border-radius: 12px;
            font-size: 12px;
        }

        /* 参与状态标签 */
 .participation-status {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
 font-weight: bold;
            margin-bottom: 12px;
        }

        .status-registered {
            background-color: #e3f2fd;
 color: #1976d2;
        }

 .status-attended {
            background-color: #e8f5e9;
            color: #388e3c;
 }

        .status-missed {
 background-color: #ffebee;
            color: #e53935;
        }

        /* 评价按钮 */
        .review-section {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .review-btn {
            background-color: #f0f8ff;
 color: #45b7d1;
 border: none;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 14px;
            cursor: pointer;
 transition: all 0.3s ease;
        }

 .review-btn:hover {
            background-color: #e1f0ff;
        }

        /* 空状态 */
        .empty-state {
 text-align: center;
 padding: 60px 20px;
 color: #999;
        }

        .empty-icon {
 font-size: 60px;
 margin-bottom: 20px;
 color: #ddd;
 }

        .empty-title {
            font-size: 18px;
            margin-bottom: 8px;
 }

        .empty-description {
            font-size: 14px;
            margin-bottom: 20px;
        }

 .create-btn {
            background: linear-gradient(135deg, #ff6b35 0%, #f9a825 100%);
            color: white;
 border: none;
            padding: 12px 24px;
            border-radius: 24px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
        }

        /* 底部导航 */
 .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
 background-color: white;
            border-top: 1px solid #eee;
            display: flex;
 justify-content: space-around;
            padding: 12px 0;
            z-index: 100;
        }

        .nav-item {
 display: flex;
            flex-direction: column;
            align-items: center;
            color: #9e9e9e;
            font-size: 12px;
            cursor: pointer;
 transition: all 0.3s ease;
        }

        .nav-item.active {
            color: #ff6b35;
        }

        .nav-icon {
 font-size: 20px;
 margin-bottom: 4px;
        }

        /* 加载动画 */
        .loading {
            text-align: center;
            padding: 40px 20px;
        }

        .spinner {
            width: 36px;
            height: 36px;
 border: 4px solid #f3f3f3;
 border-top: 4px solid #ff6b35;
 border-radius: 50%;
            animation: spin 1s linear infinite;
 margin: 0 auto 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

 /* 弹窗样式 */
        .modal {
            display: none;
            position: fixed;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
 background-color: white;
 border-radius: 16px;
 width: 85%;
            max-width: 320px;
            padding: 24px;
            text-align: center;
            transform: translateY(20px);
            opacity: 0;
            transition: all 0.3s ease;
 }

        .modal.show {
            transform: translateY(0);
            opacity: 1;
        }

        .modal-title {
 font-size: 20px;
 font-weight: bold;
 margin-bottom: 16px;
 color: #333;
        }

        .modal-message {
 margin-bottom: 24px;
 color: #666;
 line-height: 1.6;
 }

        .modal-actions {
            display: flex;
 gap: 12px;
        }

        .modal-btn {
 flex: 1;
 padding: 12px;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
 transition: all 0.3s ease;
        }

        .cancel-btn {
 background-color: #f5f5f5;
 color: #666;
        }

        .confirm-btn {
 background: linear-gradient(135deg, #ff6b35 0%, #f9a825 100%);
            color: white;
        }

 /* 响应式适配 */
 @media (max-width: 480px) {
            .activity-cover {
                height: 140px;
            }
            .header-content {
 padding-top: 4px;
            }
        }

 /* 动画效果 */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

 .activity-card {
            animation: fadeInUp 0.6s ease forwards;
        }

        /* 活动类型标签颜色 */
        .tag-sport { background-color: #e3f2fd; color: #1976d2; }
 .tag-learning { background-color: #f3e5f5; color: #7b1fa2; }
        .tag-social { background-color: #e8f5e9; color: #388e3c; }
        .tag-food { background-color: #fff3e0; color: #f57c00; }
        .tag-culture { background-color: #fce4ec; color: #c2185b; }
        .tag-outdoor { background-color: #e0f2f1; color: #00796b; }
 </style>
</head>
<body>
 <div class="container">
        <!-- 头部导航 -->
        <header class="header">
 <div class="header-content">
                <button class="back-btn" id="backBtn">←</button>
                <div class="header-title">参与记录</div>
 <button class="action-btn" id="filterBtn">筛选</button>
            </div>
 </header>

        <!-- 参与统计 -->
        <div class="stats-section">
 <h3>我的参与统计</h3>
            <div class="stats-grid">
 <div class="stat-card">
                    <div class="stat-number">28</div>
 <div class="stat-label">总参与次数</div>
                </div>
                <div class="stat-card">
 <div class="stat-number">12</div>
 <div class="stat-label">已参加</div>
 </div>
                <div class="stat-card">
                    <div class="stat-number">8</div>
 <div class="stat-label">待评价</div>
 </div>
            </div>
        </div>

        <!-- 参与状态筛选 -->
        <div class="status-filter">
            <div class="filter-item active" data-status="all">全部</div>
            <div class="filter-item" data-status="registered">已报名</div>
            <div class="filter-item" data-status="attended">已参加</div>
            <div class="filter-item" data-status="missed">未参加</div>
        </div>

        <!-- 活动列表 -->
 <div class="activity-list" id="activityList">
 <!-- 活动卡片 1 - 已参加 -->
            <div class="activity-card" data-activity-id="1">
                <img src="https://images.unsplash.com/photo-1501854140801-50d01698950b?w=400&h=160&fit=crop" alt="户外徒步活动" class="activity-cover">
 <div class="activity-content">
                    <h3 class="activity-title">周末户外徒步活动</h3>
                    <div class="activity-meta">
 <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>城市公园</span>
 </div>
                        <div class="meta-item">
 <span class="meta-icon">⏰</span>
 <span>周六 14:00 - 17:00</span>
 </div>
                    </div>
                    <div class="participation-status status-attended">已参加</div>
 <div class="activity-tags">
                        <span class="tag tag-sport">运动</span>
                        <span class="tag tag-outdoor">户外</span>
                    </div>
 <div class="review-section">
 <span>活动评价</span>
                        <button class="review-btn">已评价</button>
                    </div>
 </div>
            </div>

            <!-- 活动卡片 2 - 已参加 -->
            <div class="activity-card" data-activity-id="2">
                <img src="https://images.unsplash.com/photo-1504805572947-34fad45aed93?w=400&h=160&fit=crop" alt="读书分享会" class="activity-cover">
 <div class="activity-content">
                    <h3 class="activity-title">经典小说读书分享会</h3>
                    <div class="activity-meta">
                        <div class="meta-item">
 <span class="meta-icon">📍</span>
 <span>咖啡书店</span>
 </div>
                        <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周五 19:30 - 21:00</span>
                        </div>
 </div>
                    
                    <div class="participation-status status-attended">已参加</div>
                    <div class="activity-tags">
 <span class="tag tag-learning">学习</span>
 <span class="tag tag-social">社交</span>
                    </div>
                    <div class="review-section">
 <span>活动评价</span>
                        <button class="review-btn">已评价</button>
                    </div>
 </div>
            </div>

            <!-- 活动卡片 3 - 待评价 -->
            <div class="activity-card" data-activity-id="3">
                <img src="https://images.unsplash.com/photo-1543269865-cbf427effbad?w=400&h=160&fit=crop" alt="摄影交流会" class="activity-cover">
 <div class="activity-content">
                    <h3 class="activity-title">周末摄影交流会</h3>
                    <div class="activity-meta">
 <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>城市广场</span>
                        </div>
 <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周日 10:00 - 12:00</span>
                        </div>
                    </div>
                    <div class="participation-status status-attended">已参加</div>
                    
                    <div class="activity-tags">
 <span class="tag tag-culture">文化</span>
                        <span class="tag tag-social">社交</span>
 </div>
                    
                    <div class="review-section">
 <span>活动评价</span>
 <button class="review-btn">去评价</button>
 </div>
                </div>
            </div>

 <!-- 活动卡片 4 - 已报名 -->
            <div class="activity-card" data-activity-id="4">
                <img src="https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=400&h=160&fit=crop" alt="美食探店" class="activity-cover">
 <div class="activity-content">
                    <h3 class="activity-title">城市美食探店之旅</h3>
                    <div class="activity-meta">
                        <div class="meta-item">
 <span class="meta-icon">📍</span>
 <span>美食街</span>
 </div>
                        <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周六 18:00 - 20:00</span>
                        </div>
 </div>
 <div class="participation-status status-registered">已报名</div>
                    
                    <div class="activity-tags">
 <span class="tag tag-food">美食</span>
 <span class="tag tag-social">社交</span>
                    </div>
                    
 <div class="review-section">
                        <span>活动评价</span>
                        <button class="review-btn" disabled>未参加</button>
                    </div>
                </div>
 </div>

            <!-- 活动卡片 5 - 已参加 -->
            <div class="activity-card" data-activity-id="5">
                <img src="https://images.unsplash.com/photo-1493246507139-91e8fad9978e?w=400&h=160&fit=crop" alt="手工制作" class="activity-cover">
                <div class="activity-content">
                    <h3 class="activity-title">手工制作DIY工作坊</h3>
 <div class="activity-meta">
                        <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>创意工坊</span>
                        </div>
 <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周日 14:00 - 16:00</span>
                        </div>
 </div>
 <div class="participation-status status-attended">已参加</div>
                    
                    <div class="activity-tags">
 <span class="tag tag-culture">文化</span>
                        <span class="tag tag-social">社交</span>
 </div>
 <div class="review-section">
                        <span>活动评价</span>
                        <button class="review-btn">已评价</button>
                    </div>
 </div>
            </div>

            <!-- 活动卡片 6 - 待评价 -->
            <div class="activity-card" data-activity-id="6">
                <img src="https://images.unsplash.com/photo-1523906754882-3d2a3f15b1e2?w=400&h=160&fit=crop" alt="音乐分享会" class="activity-cover">
 <div class="activity-content">
                    <h3 class="activity-title">周末音乐分享会</h3>
                    <div class="activity-meta">
 <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>音乐厅</span>
                        </div>
 <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周六 20:00 - 22:00</span>
 </div>
                    </div>
                    
 <div class="participation-status status-attended">已参加</div>
 <div class="activity-tags">
                        <span class="tag tag-culture">文化</span>
 <span class="tag tag-social">社交</span>
                    </div>
                    
 <div class="review-section">
 <span>活动评价</span>
 <button class="review-btn">去评价</button>
                    </div>
 </div>
            </div>

            <!-- 活动卡片 7 - 已报名 -->
            <div class="activity-card" data-activity-id="7">
                <img src="https://images.unsplash.com/photo-1543269865-cbf427effbad?w=400&h=160&fit=crop" alt="摄影交流会" class="activity-cover">
 <div class="activity-content">
                    <h3 class="activity-title">春季摄影比赛</h3>
                    <div class="activity-meta">
                        <div class="meta-item">
 <span class="meta-icon">📍</span>
 <span>城市公园</span>
                        </div>
                        <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>下周三 15:00 - 17:00</span>
                        </div>
 </div>
 <div class="participation-status status-registered">已报名</div>
 <div class="activity-tags">
                        <span class="tag tag-culture">文化</span>
                        <span class="tag tag-social">社交</span>
                    </div>
                    <div class="review-section">
 <span>活动评价</span>
                        <button class="review-btn" disabled>未参加</button>
                    </div>
 </div>
            </div>

            <!-- 活动卡片 8 - 已参加 -->
            <div class="activity-card" data-activity-id="8">
                <img src="https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=400&h=160&fit=crop" alt="美食探店" class="activity-cover">
 <div class="activity-content">
                    <h3 class="activity-title">周末美食分享会</h3>
 <div class="activity-meta">
                        <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>美食街</span>
                        </div>
                        <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>上周六 18:00 - 20:00</span>
                        </div>
 </div>
 <div class="participation-status status-attended">已参加</div>
 <div class="activity-tags">
                        <span class="tag tag-food">美食</span>
 <span class="tag tag-social">社交</span>
                    </div>
                    
 <div class="review-section">
                        <span>活动评价</span>
                        <button class="review-btn">已评价</button>
 </div>
                </div>
            </div>
        </div>

        <!-- 底部导航 -->
 <nav class="bottom-nav">
            <div class="nav-item" data-page="home">
 <span class="nav-icon">🏠</span>
 <span>首页</span>
            </div>
 <div class="nav-item" data-page="search">
                <span class="nav-icon">🔍</span>
                <span>搜索</span>
 </div>
            <div class="nav-item" data-page="publish">
 <span class="nav-icon">➕</span>
 <span>发布</span>
            </div>
 <div class="nav-item active" data-page="profile">
                <span class="nav-icon">👤</span>
                <span>我的</span>
            </div>
        </nav>

 <!-- 加载状态 -->
 <div class="loading" id="loadingIndicator">
 <div class="spinner"></div>
 <p>加载中...</p>
 </div>

        <!-- 通知 Toast -->
        <div id="toast" style="display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background-color: #4caf50; color: white; padding: 12px 24px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1001;"></div>
    </div>

    <script>
 // 全局变量        let currentStatus = 'all';
 const activityData = [
 {
                id: 1,
                title: "周末户外徒步活动",
                location: "城市公园",
 time: "周六 14:00 - 17:00",
                status: "attended",
                tags: ["sport", "outdoor"],
 participants: 12,
                cover: "https://images.unsplash.com/photo-1501854140801-50d01698950b?w=400&h=160&fit=crop"
            },
 {
                id: 2,
                title: "经典小说读书分享会",
 location: "咖啡书店",
                time: "周五 19:30 - 21:00",
                status: "attended",
                tags: ["learning", "social"],
                participants: 8,
                cover: "https://images.unsplash.com/photo-1504805572947-34fad45aed93?w=400&h=160&fit=crop"
            },
 {
                id: 3,
                title: "周末摄影交流会",
                location: "城市广场",
 time: "周日 10:00 - 12:00",
                status: "attended",
                tags: ["culture", "social"],
                participants: 25,
 cover: "https://images.unsplash.com/photo-1543269865-cbf427effbad?w=400&h=160&fit=crop"
 },
            {
                id: 4,
                title: "城市美食探店之旅",
 location: "美食街",
                time: "周六 18:00 - 20:00",
                status: "registered",
                tags: ["food", "social"],
                participants: 15,
 cover: "https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=400&h=160&fit=crop"
            },
 {
                id: 5,
                title: "手工制作DIY工作坊",
                location: "创意工坊",
 time: "周日 14:00 - 16:00",
 status: "attended",
                tags: ["culture", "social"],
                participants: 6,
                cover: "https://images.unsplash.com/photo-1493246507139-91e8fad9978e?w=400&h=160&fit=crop"
 },
            {
                id: 6,
                title: "周末音乐分享会",
                location: "音乐厅",
                time: "周六 20:00 - 22:00",
 status: "attended",
                tags: ["culture", "social"],
                participants: 20,
 cover: "https://images.unsplash.com/photo-1523906754882-3d2a3f15b1e2?w=400&h=160&fit=crop"
            },
 {
                id: 7,
                title: "春季摄影比赛",
                location: "城市公园",
 time: "下周三 15:00 - 17:00",
 status: "registered",
 tags: ["culture", "social"],
                participants: 18,
                cover: "https://images.unsplash.com/photo-1543269865-cbf427effbad?w=400&h=160&fit=crop"
            },
            {
 id: 8,
 title: "周末美食分享会",
 location: "美食街",
                time: "上周六 18:00 - 20:00",
                status: "attended",
                tags: ["food", "social"],
                participants: 22,
                cover: "https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=400&h=160&fit=crop"
            }
        ];

 // 初始化        document.addEventListener('DOMContentLoaded', function() {
            initEventListeners();
 simulateLoading();
 // 初始化状态筛选 updateFilterDisplay();
        });

 // 初始化事件监听器        function initEventListeners() {
            // 返回按钮            document.getElementById('backBtn').addEventListener('click', function() {
 window.history.back();
            });

            // 筛选按钮            document.getElementById('filterBtn').addEventListener('click', function() {
 alert('跳转到筛选页面');
 });

            // 状态筛选
 const filterItems = document.querySelectorAll('.filter-item');
            filterItems.forEach(item => {
 item.addEventListener('click', function() {
 // 移除所有激活状态
 filterItems.forEach(i => i.classList.remove('active'));
 // 添加当前激活状态                    this.classList.add('active');
                    
                    currentStatus = this.dataset.status;
                    filterActivities();
                });
            });

 // 评价按钮点击 const reviewButtons = document.querySelectorAll('.review-btn');
            reviewButtons.forEach(button => {
 button.addEventListener('click', function() {
                    if (this.textContent === '去评价') {
 alert('跳转到活动评价页面');
                    } else if (this.textContent === '已评价') {
 alert('您已经评价过此活动');
                    } else {
                        // 未参加状态的按钮 alert('请先参加活动才能评价');
 }
                });
            });

 // 活动卡片点击
 const activityCards = document.querySelectorAll('.activity-card');
            activityCards.forEach(card => {
 card.addEventListener('click', function() {
 const activityId = this.dataset.activityId;
                    alert(`查看活动详情：${activityId}`);
 });
            });

            // 底部导航切换
 const navItems = document.querySelectorAll('.nav-item');
            navItems.forEach(item => {
 item.addEventListener('click', function() {
 // 移除所有激活状态
 navItems.forEach(i => i.classList.remove('active'));
 // 添加当前激活状态                    this.classList.add('active');
                    
 const page = this.dataset.page;
                    handleNavigation(page);
                });
 });

            // 模拟数据更新            setInterval(updateActivityStatus, 60000); // 每分钟检查一次状态 }

        // 过滤活动显示
 function filterActivities() {
 const activityCards = document.querySelectorAll('.activity-card');
            
 if (currentStatus === 'all') {
                activityCards.forEach(card => {
                    card.style.display = 'block';
                });
 } else {
                activityCards.forEach(card => {
                    const statusClass = Array.from(card.classList).find(cls => cls.startsWith('status-'));
 if (statusClass && statusClass.includes(currentStatus)) {
                        card.style.display = 'block';
 } else {
                        card.style.display = 'none';
 }
                });
            }
 }

        // 更新筛选显示 function updateFilterDisplay() {
 const filterItems = document.querySelectorAll('.filter-item');
            filterItems.forEach(item => {
 if (item.dataset.status === currentStatus) {
                    item.classList.add('active');
 } else {
                    item.classList.remove('active');
                }
            });
 }

        // 处理导航切换        function handleNavigation(page) {
            switch(page) {
                case 'home':
 alert('跳转到首页');
                    break;
                case 'search':
                    alert('跳转到搜索页面');
                    break;
                case 'publish':
                    alert('跳转到发布页面');
                    break;
                case 'profile':
                    // 个人中心无需特殊处理                    break;
            }
 }

        // 更新活动状态（模拟）
        function updateActivityStatus() {
            // 模拟一些活动状态变化
 const activityCards = document.querySelectorAll('.activity-card');
            
 if (activityCards.length > 0) {
                const randomIndex = Math.floor(Math.random() * activityCards.length);
                const card = activityCards[randomIndex];
                
 // 模拟状态变化 const statusClasses = ['status-registered', 'status-attended', 'status-missed'];
                const currentStatusClass = Array.from(card.classList).find(cls => cls.startsWith('status-'));
                if (currentStatusClass) {
 const currentIndex = statusClasses.indexOf(currentStatusClass);
                    const nextIndex = (currentIndex + 1) % statusClasses.length;
                    // 移除当前状态类 card.classList.remove(currentStatusClass);
                    // 添加新状态类 card.classList.add(statusClasses[nextIndex]);
                    // 更新状态标签文本和样式 const statusTag = card.querySelector('.participation-status');
                    if (statusTag) {
                        switch(statusClasses[nextIndex]) {
                            case 'status-registered':
                                statusTag.textContent = '已报名';
                                statusTag.className = 'participation-status status-registered';
                                break;
                            case 'status-attended':
                                statusTag.textContent = '已参加';
                                statusTag.className = 'participation-status status-attended';
 break;
 case 'status-missed':
                                statusTag.textContent = '未参加';
                                statusTag.className = 'participation-status status-missed';
                                break;
                        }
                    }
                    
                    // 更新评价按钮状态 const reviewBtn = card.querySelector('.review-btn');
 if (reviewBtn) {
 switch(statusClasses[nextIndex]) {
 case 'status-registered':
                                reviewBtn.textContent = '未参加';
                                reviewBtn.disabled = true;
 break;
 case 'status-attended':
 // 检查是否需要评价 const hasReview = Math.random() > 0.5;
                                reviewBtn.textContent = hasReview ? '去评价' : '已评价';
 reviewBtn.disabled = false;
                                break;
                            case 'status-missed':
                                reviewBtn.textContent = '未参加';
                                reviewBtn.disabled = true;
 break;
 }
                    }
                }
 }
        }

        // 显示加载状态 function showLoading() {
            const loading = document.getElementById('loadingIndicator');
 loading.style.display = 'block';
        }

        // 隐藏加载状态
 function hideLoading() {
 const loading = document.getElementById('loadingIndicator');
            loading.style.display = 'none';
 }

        // 模拟加载效果        function simulateLoading() {
            showLoading();
            setTimeout(() => {
                hideLoading();
            }, 1500);
        }

 // 显示成功提示        function showSuccessToast(message) {
 const toast = document.getElementById('toast');
 toast.textContent = message;
 toast.style.display = 'block';
            
 // 3秒后自动隐藏
 setTimeout(() => {
                toast.style.display = 'none';
            }, 3000);
 }

        // 添加触摸反馈效果
 const buttons = document.querySelectorAll('button, .activity-card');
        buttons.forEach(button => {
            button.addEventListener('touchstart', function() {
                this.style.transform = 'scale(0.98)';
            });
 button.addEventListener('touchend', function() {
 this.style.transform = 'scale(1)';
            });
 });

        // 添加页面滚动效果
 let lastScrollTop = 0;
 window.addEventListener('scroll', function() {
 const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
            // 隐藏/显示底部导航 const bottomNav = document.querySelector('.bottom-nav');
            if (scrollTop > lastScrollTop && scrollTop > 100) {
 bottomNav.style.transform = 'translateY(100%)';
 } else {
                bottomNav.style.transform = 'translateY(0)';
            }
            lastScrollTop = scrollTop;
        });

        // 添加返回顶部功能 window.addEventListener('scroll', function() {
            if (window.pageYOffset > 300) {
 // 可以添加返回顶部按钮            }
 });
    </script>
</body>
</html>
